package com.calligraphy.user.exception;

import com.calligraphy.user.enums.ResultEnum;

/**
 * @Author hy
 * @Date 2018/12/27 14:35
 **/
public class UserException extends RuntimeException{

    private int code;

    public UserException(ResultEnum resultEnum){
        super(resultEnum.getMessage());

        this.code = resultEnum.getCode();
    }

    public UserException(int code,String message){
        super(message);

        this.code = code;
    }

}
